<template>
  <div v-show="header.opened" class="container-layer-header">
    <span v-if="header.canBack" class="miva-btn" @click="$router.back()">
      <img src="@/assets/返回.png" alt="">
    </span>
    <span class="title">{{ header.title }}</span>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
    computed: {
        ...mapGetters(['header'])
    }
}
</script>

<style lang="less" scoped>
.container-layer-header {
  width: 100%;
  height: 45px;
  padding: 0 15px;
  position: fixed;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  background-color: #fff;
  .title {
    margin-left: 15px;
    color: #000;
  }
  .miva-btn {
    width: 20px;
    height: 20px;
    img {
      width: 100%;
    }
  }
}
</style>
